<template>
  <div class="container">
    <div class="left">
      <!-- 导航 -->
      <div class="card-nav">
        <router-link class="tag" :to="{ name: 'NewList' }">最新</router-link>
        <router-link class="tag" :to="{ name: 'HotList' }">热榜</router-link>
        <router-link class="tag" :to="{ name: 'FollowList' }">关注</router-link>
      </div>
      <!-- 文章卡片 -->
      <router-view></router-view>
    </div>

    <div class="right">
      <div class="card">
        <div class="myPhoto">
          <img class="myPhoto" src="../../assets/img/头像.png" alt="" />
        </div>
        <h2 class="nickname">男神味的果冻</h2>
        <div class="row">
          <div class="view">
            <h3 class="num">265</h3>
            <span>总访问量</span>
          </div>
          <div class="solution">
            <h3 class="num">5</h3>
            <span>答疑总数</span>
          </div>
        </div>
        <div class="row">
          <div class="fans">
            <h3 class="num">265</h3>
            <span>粉丝</span>
          </div>
          <div class="follow">
            <h3 class="num">5</h3>
            <span>关注</span>
          </div>
        </div>
        <div class="row">
          <router-link :to="{ name: 'Publish' }">
            <el-button type="primary" plain>发文章</el-button>
          </router-link>
          <el-button type="success" plain>草稿箱</el-button>
        </div>
      </div>
    </div>
  </div>
</template>  
  
<script>
export default {
  name: "Index",
  methods: {},
  data() {
    return {};
  },
};
</script>

<style scoped>
.container {
  margin: 10px auto;
  width: 1500px;
  max-height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container .right {
  width: 300px;
  height: 560px;
  background-color: white;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  min-width: 300px;
  margin-left: 100px;
}
.container .left {
  width: 700px;
  background-color: white;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  margin: 10px;
}

.card-nav {
  width: 100%;
  height: 58px;
  display: flex;
  justify-content: left;
  align-items: center;
  border-bottom: 1px solid #f5f5f5;
}

.left .tag {
  display: block;
  margin: 0 20px;
  color: black;
}

.left .tag:hover {
  color: #056de8;
}

.right .card {
  width: 100%;
  height: 100%;
  padding: 30px;
  background-color: white;
}

.right .card .myPhoto {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  margin: 1px auto;
}

.right .card .nickname {
  width: 150px;
  height: 30px;
  margin: 10px auto;
}

.right .card .row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px 0;
}

.right .card .row .num {
  text-align: center;
  color: #222226;
  font-weight: 600;
  font-size: 20px;
}
</style>